package com.gdteam.kernel.domain.impl;

import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.annotations.InjectResource;
import org.slf4j.Logger;

import com.gdteam.kernel.domain.Domain;
import com.gdteam.kernel.domain.DomainModelDAO;
import com.gdteam.kernel.domain.DomainModelDAOFactory;
import com.gdteam.kernel.domain.DomainModelFactory;
import com.gdteam.kernel.persistence.PersistencyUnitManager;

public class DomainModelDAOFactoryImpl implements DomainModelDAOFactory {

    @Inject
    private DomainModelFactory dmf = null;
    
    @Inject
    private PersistencyUnitManager pm = null;
    
    @InjectResource
    private Logger log = null;
    
    public DomainModelDAO<? extends Domain> get(String fqn) {
        return new DomainModelDaoImpl<Domain>(pm.getUtil(),dmf, log);
    }

}
